<template>
  <div style="width: 800px;margin: auto">
    用户名:<el-input style="width: 300px" v-model="userObj.userName" placeholder="请输入用户名"></el-input><br>
    密码:<el-input style="width: 300px" v-model="userObj.pwd" type="password" placeholder="请输入密码"></el-input><br>
    <el-button type="primary" @click="land">登陆</el-button>

  </div>

</template>

<script>
import axios from "axios"
export default {
  name: "login",
  data(){
    return{
      userObj:{}
    }
  },
  methods:{
    land(){
      axios.get("/project/user/login",{params:this.userObj}).then(resp=>{
        if (resp.data=="ok"){
          this.$router.push("/Index")
        }
      })
    }
  }
}
</script>

<style scoped>

</style>